import { connect } from 'react-redux';
import ListItemUI from './listItemUI.js';
import {  deletedAction} from '../store/createAction';



const mapStateToProps = state => {
    return {
        listData:state.listData
    }
}

const mapDispatchToProps = (dispatch) => {
    return {
        handleDeletedItem:(index) => {
           dispatch(deletedAction(index))
        }
    }
}

const ListItem = connect(
    mapStateToProps,
    mapDispatchToProps
)(ListItemUI)



export default ListItem;
